package com.sinocare.system.service.Impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sinocare.common.entity.SystemAccount;
import com.sinocare.common.entity.SystemSettings;
import com.sinocare.common.vo.AccountVo;
import com.sinocare.common.vo.PassWordVo;
import com.sinocare.system.mapper.AccountMapper;
import com.sinocare.system.service.AccountService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class AccountServiceImpl extends ServiceImpl<AccountMapper, SystemAccount> implements AccountService {

    @Resource AccountMapper accountMapper;

    /**
     * 查询所有系统账号(包括模糊条件查询，分页)
     * @param accountVo
     * @return
     */
    @Override
    public List<SystemAccount> listAccount(AccountVo accountVo) {
        return accountMapper.listAccount(accountVo);
    }

    @Override
    public int updateAccount(Integer id) {
        return accountMapper.updateAccount(id);
    }

    @Override
    public int update(SystemAccount systemAccount) {
        return accountMapper.update(systemAccount);
    }

    @Override
    public List<SystemAccount> listStoreName() {
        return accountMapper.listStoreName();
    }

    @Override
    public List<SystemAccount> listRoleName() {
        return accountMapper.listRoleName();
    }

    @Override
    public int add(SystemAccount systemAccount) {
        return accountMapper.add(systemAccount);
    }

    @Override
    public int addRole(SystemAccount systemAccount) {
        return accountMapper.addRole(systemAccount);
    }

    @Override
    public int addStore(SystemAccount systemAccount) {
        return accountMapper.addStore(systemAccount);
    }

    @Override
    public int updatePassWord(PassWordVo passWordVo) {
        return accountMapper.updatePassWord(passWordVo);
    }


}
